//
//  FindPwdBackView.m
//  LoverGo
//
//  Created by liudonghuan on 14-9-13.
//  Copyright (c) 2014年 yexiao. All rights reserved.
//

#import "FindPwdBackView.h"

@implementation FindPwdBackView
@synthesize findDelegate = _findDelegate;
- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        _step1V = [[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
        _step2V = [[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
        _step3V = [[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
        [self addSubview:_step1V];
        [self addSubview:_step2V];
        [self addSubview:_step3V];
        
        _phoneNumTF = [[UITextField alloc]initWithFrame:CGRectMake(20, 20, 280, 40)];
        _phoneNumTF.placeholder = @"手机号";
        [_phoneNumTF setBorderStyle:UITextBorderStyleRoundedRect]; //外框类型
        _getCheckNumBtn =[LGUtil get9ScalBtn:CGRectMake(20, 70, 280, 40) type:TypeColorLogin];
        [_getCheckNumBtn setTitle:@"获取验证码" forState:UIControlStateNormal];
        [_step1V addSubview:_phoneNumTF];
        [_step1V addSubview:_getCheckNumBtn];
        
        _phoneNumLab = [[UILabel alloc]initWithFrame:CGRectMake(20, 20, 280, 40)];
        _checkNumTF = [[UITextField alloc]initWithFrame:CGRectMake(20, 70, 280, 40)];
        _checkNumTF.placeholder = @"您收到的验证码";
        _checkNumTF.keyboardType = UIKeyboardTypeNumberPad;
        [_checkNumTF setBorderStyle:UITextBorderStyleRoundedRect]; //外框类型
        _checkBtn =[LGUtil get9ScalBtn:CGRectMake(20, 120, 280, 40) type:TypeColorLogin];
        [_checkBtn setTitle:@"校验验证码" forState:UIControlStateNormal];
        [_step2V addSubview:_phoneNumLab];
        [_step2V addSubview:_checkNumTF];
        [_step2V addSubview:_checkBtn];
        
        _psdTF = [[UITextField alloc]initWithFrame:CGRectMake(20, 20, 280, 40)];
        _psdTF.placeholder = @"输入新密码";
        [_psdTF setBorderStyle:UITextBorderStyleRoundedRect]; //外框类型
        _psdCheckTF = [[UITextField alloc]initWithFrame:CGRectMake(20, 70, 280, 40)];
        _psdCheckTF.placeholder = @"再次输入新密码";
        [_psdCheckTF setBorderStyle:UITextBorderStyleRoundedRect]; //外框类型
        _submitBtn =[LGUtil get9ScalBtn:CGRectMake(20, 120, 280, 40) type:TypeColorLogin];
        [_submitBtn setTitle:@"修改密码" forState:UIControlStateNormal];
        [_step3V addSubview:_psdTF];
        [_step3V addSubview:_psdCheckTF];
        [_step3V addSubview:_submitBtn];
        
        [_getCheckNumBtn addTarget:self action:@selector(method1) forControlEvents:UIControlEventTouchUpInside];
        [_checkBtn addTarget:self action:@selector(method2) forControlEvents:UIControlEventTouchUpInside];
        [_submitBtn addTarget:self action:@selector(method3) forControlEvents:UIControlEventTouchUpInside];
        _step2V.hidden = YES;
        _step3V.hidden = YES;
    }
    return self;
}
-(void)method1{
    [_findDelegate toGetCheckNum:self];
}
-(void)method2{
    [_findDelegate checkNum:self];
}
-(void)method3{
    [_findDelegate submit:self];
}
@end
